#include<bits/stdc++.h>
using namespace std;
struct cd
{
    int r;
    bool dead,atk;
}mon[100005];
int n,m,nd=1;bool gaming=true;
bool check(int mid)
{
    if(mon[mid].dead||mon[mid].atk) {return true;}
    else return mon[mid].r<=mon[nd].r;
}
void out()
{
    if(nd>=n)
    {
        gaming=false;
        return ;
    }
    int l=nd+1,r=n;
    while(mon[l].atk)   {l++;}
    while(l<r)
    {
        int mid=(l+r)>>1;
        if(check(mid))
        {
            l=mid+1;
        }
        else
        {
            r=mid;
        }
    }
    if(mon[l].r>mon[nd].r&&(mon[l].atk==false))
    {
        mon[l].atk=true;mon[nd].dead=true;
        m--;nd++;
    }
    else
    {
        gaming=false;
    }
    while(mon[nd].dead) {nd++;}
    return ;
}
bool cmp(cd a,cd b)
{
    return a.r<b.r;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);m=n;
    for(int i=1;i<=n;i++)   {scanf("%d",&mon[i].r);}
    sort(mon+1,mon+n+1,cmp);
    if(n>1) {while(gaming)   {out();}}
    printf("%d",m);
    return 0;
}
